﻿<ui:View x:Class="CPPEI.Coolzon.Designer.Views.DesignView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
         xmlns:ui="clr-namespace:CPPEI.Coolzon.UI;assembly=CPPEI.Coolzon.UI"
         xmlns:src="clr-namespace:CPPEI.Coolzon.Designer.Views"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <ui:View.Resources>
        <ResourceDictionary>
            <SolidColorBrush x:Key="_gridLine0" Color="Transparent"/>
            <ImageBrush x:Key="_gridLine5"  ImageSource="/CPPEI.Coolzon.Designer.Views;component/DesignView/GridLine/gridline5x5.png" TileMode="Tile" Viewport="0,0,5,5"  ViewportUnits="Absolute" Opacity="0.5"  />
            <ImageBrush x:Key="_gridLine10"  ImageSource="/CPPEI.Coolzon.Designer.Views;component/DesignView/GridLine/gridline10x10.png" TileMode="Tile" Viewport="0,0,10,10"  ViewportUnits="Absolute" Opacity="0.5"    />
            <ImageBrush x:Key="_gridLine50"  ImageSource="/CPPEI.Coolzon.Designer.Views;component/DesignView/GridLine/gridline50x50.png" TileMode="Tile" Viewport="0,0,50,50"  ViewportUnits="Absolute" Opacity="0.5"   />
            <ImageBrush x:Key="_gridLine100"  ImageSource="/CPPEI.Coolzon.Designer.Views;component/DesignView/GridLine/gridline100x100.png" TileMode="Tile" Viewport="0,0,100,100"  ViewportUnits="Absolute" Opacity="0.5"    />
        </ResourceDictionary>
    </ui:View.Resources>
    <Grid x:Name="_ctlLayout" Background="White" Cursor="Arrow">
        <Grid.RowDefinitions>
            <RowDefinition Height="auto"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="auto"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="auto"/>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="auto"/>
        </Grid.ColumnDefinitions>
        <src:RuleCtrl x:Name="RuleX" AutoSize="True" Height="30"  Grid.Row="0" Grid.Column="1"  Mark="Down" Cursor="Arrow" />
        <src:RuleCtrl x:Name="RuleY" AutoSize="True" Height="30" Grid.Row="1" Grid.Column="0" Cursor="Arrow"  >
            <src:RuleCtrl.LayoutTransform>
                <RotateTransform Angle="90" />
            </src:RuleCtrl.LayoutTransform>
        </src:RuleCtrl>
        <Grid x:Name="_ctlGrid" Grid.Row="1" Grid.Column="1" ClipToBounds="True" >
            <ui:PartFrame x:Name="_ctlMainFrame" XMargin="-1,-1,0,0">

            </ui:PartFrame>
            <Canvas Name="_ctlCanvas"  Margin="0.5,0.5,0,0"  Cursor="Arrow" Background="{Binding Source={StaticResource _gridLine50}}" >
                <src:DesignBorder x:Name="_ctlDesignBorder" Canvas.Left="0" Canvas.Top="0"/>
                <Rectangle Name="_ctlPreviewRect" Stroke="#FFAE7E00" Fill="#01005500" Visibility="Hidden" />
                <Label Name="_ctlDesignLayoutPartSize" Content="100,100" BorderBrush="Gray" BorderThickness="1" Padding="0">
                    
                </Label>
                <Line Name="_ctlAlignLineX" Stroke="Blue" StrokeThickness="1" X1="100"  Y1="100" X2="150" Y2="100" Visibility="Collapsed"/>
                <Line Name="_ctlAlignLineY" Stroke="Blue" StrokeThickness="1" X1="100"  Y1="100" X2="150" Y2="100" Visibility="Collapsed"/>
            </Canvas>
        </Grid>
        <ScrollBar Name="_ctlScrollBarV" Style="{StaticResource SimpleScrollBar}" Cursor="Arrow" Orientation="Vertical" Grid.Row="1" Grid.Column="2" LargeChange="200" SmallChange="5"/>
        <Grid Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="auto"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ComboBox Name="_ctlListDesignZoomFactor" Width="55" FontSize="9" Grid.Row="0" Grid.Column="0" IsEditable="true"  IsReadOnly="true"  >
            </ComboBox>
            <ScrollBar Name="_ctlScrollBarH" Style="{StaticResource SimpleScrollBar}" Cursor="Arrow" Orientation="Horizontal" Grid.Row="0" Grid.Column="1" LargeChange="200" SmallChange="5"/>
        </Grid>
        <TextBlock Name="_ctlDebug" Text="debug" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="3" Grid.RowSpan="3"
                   HorizontalAlignment="Left"
                   VerticalAlignment="Top" Visibility="Collapsed"/>
    </Grid>
</ui:View>
